package com.gas.gm.pdu;

import com.logica.smpp.pdu.Request;
import com.logica.smpp.pdu.Response;

public abstract class DataProcessor {

	private boolean active=true;
	
	public final static String SYSTEM_ID="Gas-SMSC";
	
	private DataProcessorContainer processorContainer;
	
	public abstract void processRequest(Request cRequest) throws Exception;
	public abstract void processResponse(Response cResponse) throws Exception;
	
	public void exit(){
		active=false;
	}
	public boolean isActive() {
		return active;
	}
	public DataProcessorContainer getProcessorContainer() {
		return processorContainer;
	}
	public void setProcessorContainer(DataProcessorContainer processorContainer) {
		if(processorContainer!=null){
			processorContainer.remove(this);
		}
		this.processorContainer = processorContainer;
		if(processorContainer!=null){
			processorContainer.add(this);
		}

	}
			
}
	
	
